/*    */ package com.feeyin.radar.sys.controller;
/*    */ 
/*    */ import com.feeyin.radar.sys.model.DataInterface;
/*    */ import com.feeyin.radar.sys.service.DataInterfaceService;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.springframework.web.servlet.ModelAndView;
/*    */ import org.springframework.web.servlet.mvc.multiaction.MultiActionController;
/*    */ import org.springframework.web.servlet.view.RedirectView;
/*    */ 
/*    */ public class DataInterfaceController extends MultiActionController
/*    */ {
/*    */   private DataInterfaceService dataInterfaceService;
/*    */   private String dataInterface;
/*    */ 
/*    */   public DataInterfaceService getDataInterfaceService()
/*    */   {
/* 29 */     return this.dataInterfaceService;
/*    */   }
/*    */ 
/*    */   public void setDataInterfaceService(DataInterfaceService dataInterfaceService) {
/* 33 */     this.dataInterfaceService = dataInterfaceService;
/*    */   }
/*    */ 
/*    */   public String getDataInterface() {
/* 37 */     return this.dataInterface;
/*    */   }
/*    */ 
/*    */   public void setDataInterface(String dataInterface) {
/* 41 */     this.dataInterface = dataInterface;
/*    */   }
/*    */ 
/*    */   public ModelAndView display(HttpServletRequest request, HttpServletResponse response)
/*    */   {
/* 46 */     Map model = new HashMap();
/* 47 */     model.put("result", request.getParameter("result"));
/* 48 */     model.put("dataInterface", this.dataInterfaceService.getDataInterface());
/* 49 */     return new ModelAndView(getDataInterface(), model);
/*    */   }
/*    */ 
/*    */   public ModelAndView updateDataterface(HttpServletRequest request, HttpServletResponse response, DataInterface dataInterface)
/*    */   {
/* 54 */     boolean result = false;
/* 55 */     int success = 0;
/* 56 */     if (dataInterface != null) {
/* 57 */       result = this.dataInterfaceService.updateDataInterface(dataInterface);
/* 58 */       if (result) success = 1;
/*    */     }
/* 60 */     return new ModelAndView(new RedirectView("./dataInterface.do?action=display&result=" + success));
/*    */   }
/*    */ }

/* Location:           C:\Users\e547415\MyProject\rone\WEB-INF\classes\
 * Qualified Name:     com.feeyin.radar.sys.controller.DataInterfaceController
 * JD-Core Version:    0.6.0
 */